home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / WAIS / ir / stoplist.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-02  |  4.6 KB  |  421 lines

  1.  
  2. /* this is a set of utilities for maintaining a stoplist
  3.  * kind of a kludge.
  4.  *
  5.  * -brewster
  6.  */
  7.  
  8.  
  9. #include "stoplist.h"
  10. #include "cutil.h"
  11.  
  12. long stoplist_pointer = 0;
  13. char *stoplist[] = {
  14.   "a",
  15.   "about",
  16.   "above",
  17.   "according",
  18.   "across",
  19.   "actually",
  20.   "adj", 
  21.   "after",
  22.   "afterwards",
  23.   "again",
  24.   "against",
  25.   "all",
  26.   "almost",
  27.   "alone",
  28.   "along",
  29.   "already",
  30.   "also",
  31.   "although",
  32.   "always",
  33.   "among",
  34.   "amongst",
  35.   "an",
  36.   "and",
  37.   "another",
  38.   "any",
  39.   "anyhow",
  40.   "anyone",
  41.   "anything",
  42.   "anywhere",
  43.   "are",
  44.   "aren't",
  45.   "around",
  46.   "as",
  47.   "at",
  48.   "b",
  49.   "be",
  50.   "became",
  51.   "because",
  52.   "become",
  53.   "becomes",
  54.   "becoming",
  55.   "been",
  56.   "before",
  57.   "beforehand",
  58.   "begin",
  59.   "beginning",
  60.   "behind",
  61.   "being",
  62.   "below",
  63.   "beside",
  64.   "besides",
  65.   "between",
  66.   "beyond",
  67.   "billion",
  68.   "both",
  69.   "but",
  70.   "by",
  71.   "c",
  72.   "can",
  73.   "can't",
  74.   "cannot",
  75.   "caption",
  76.   "co",
  77.   "co.",
  78.   "could",
  79.   "couldn't",
  80.   "d",
  81.   "did",
  82.   "didn't",
  83.   "do",
  84.   "does",
  85.   "doesn't",
  86.   "don't",
  87.   "down",
  88.   "during",
  89.   "e",
  90.   "each",
  91.   "eg",
  92.   "eight",
  93.   "eighty",
  94.   "either",
  95.   "else",
  96.   "elsewhere",
  97.   "end",
  98.   "ending",
  99.   "enough",
  100.   "etc",
  101.   "even",
  102.   "ever",
  103.   "every",
  104.   "everyone",
  105.   "everything",
  106.   "everywhere",
  107.   "except",
  108.   "f",
  109.   "few",
  110.   "fifty",
  111.   "first",
  112.   "five",
  113.   "for",
  114.   "former",
  115.   "formerly",
  116.   "forty",
  117.   "found",    "",
  118.   "four",
  119.   "from",
  120.   "further",
  121.   "g",
  122.   "h",
  123.   "had",
  124.   "has",
  125.   "hasn't",
  126.   "have",
  127.   "haven't",
  128.   "he",
  129.   "he'd",
  130.   "he'll",
  131.   "he's",
  132.   "hence",
  133.   "her",
  134.   "here",
  135.   "here's",
  136.   "hereafter",
  137.   "hereby",
  138.   "herein",
  139.   "hereupon",
  140.   "hers",
  141.   "herself",
  142.   "him",
  143.   "himself",
  144.   "his",
  145.   "how",
  146.   "however",
  147.   "hundred",
  148.   "i",
  149.   "i'd",
  150.   "i'll",
  151.   "i'm",
  152.   "i've",
  153.   "ie",
  154.   "if",
  155.   "in",
  156.   "inc.",
  157.   "indeed",
  158.   "instead",
  159.   "into",
  160.   "is",
  161.   "isn't",
  162.   "it",
  163.   "it's",
  164.   "its",
  165.   "itself",
  166.   "j",
  167.   "k",
  168.   "l",
  169.   "last",
  170.   "later",
  171.   "latter",
  172.   "latterly",
  173.   "least",
  174.   "less",
  175.   "let",
  176.   "let's",
  177.   "like",
  178.   "likely",
  179.   "ltd",
  180.   "m",
  181.   "made",
  182.   "make",
  183.   "makes",
  184.   "many",
  185.   "maybe",
  186.   "me",
  187.   "meantime",
  188.   "meanwhile",
  189.   "might",
  190.   "million",
  191.   "miss",
  192.   "more",
  193.   "moreover",
  194.   "most",
  195.   "mostly",
  196.   "mr",
  197.   "mrs",
  198.   "much",
  199.   "must",
  200.   "my",
  201.   "myself",
  202.   "n",
  203.   "namely",
  204.   "neither",
  205.   "never",
  206.   "nevertheless",
  207.   "next",
  208.   "nine",
  209.   "ninety",
  210.   "no",
  211.   "nobody",
  212.   "none",
  213.   "nonetheless",
  214.   "noone",
  215.   "nor",
  216.   "not",
  217.   "nothing",
  218.   "now",
  219.   "nowhere",
  220.   "o",
  221.   "of",
  222.   "off",
  223.   "often",
  224.   "on",
  225.   "once",
  226.   "one",
  227.   "one's",
  228.   "only",
  229.   "onto",
  230.   "or",
  231.   "other",
  232.   "others",
  233.   "otherwise",
  234.   "our",
  235.   "ours",
  236.   "ourselves",
  237.   "out",
  238.   "over",
  239.   "overall",
  240.   "own",
  241.   "p",
  242.   "per",
  243.   "perhaps",
  244.   "q",
  245.   "r",
  246.   "rather",
  247.   "recent",
  248.   "recently",
  249.   "s",
  250.   "same",
  251.   "seem",
  252.   "seemed",
  253.   "seeming",
  254.   "seems",
  255.   "seven",
  256.   "seventy",
  257.   "several",
  258.   "she",
  259.   "she'd",
  260.   "she'll",
  261.   "she's",
  262.   "should",
  263.   "shouldn't",
  264.   "since",
  265.   "six",
  266.   "sixty",
  267.   "so",
  268.   "some",
  269.   "somehow",
  270.   "someone",
  271.   "something",
  272.   "sometime",
  273.   "sometimes",
  274.   "somewhere",
  275.   "still",
  276.   "stop",
  277.   "such",
  278.   "t",
  279.   "taking",
  280.   "ten",
  281.   "than",
  282.   "that",
  283.   "that'll",
  284.   "that's",
  285.   "that've",
  286.   "the",
  287.   "their",
  288.   "them",
  289.   "themselves",
  290.   "then",
  291.   "thence",
  292.   "there",
  293.   "there'd",
  294.   "there'll",
  295.   "there're",
  296.   "there's",
  297.   "there've",
  298.   "thereafter",
  299.   "thereby",
  300.   "therefore",
  301.   "therein",
  302.   "thereupon",
  303.   "these",
  304.   "they",
  305.   "they'd",
  306.   "they'll",
  307.   "they're",
  308.   "they've",
  309.   "thirty",
  310.   "this",
  311.   "those",
  312.   "though",
  313.   "thousand",
  314.   "three",
  315.   "through",
  316.   "throughout",
  317.   "thru",
  318.   "thus",
  319.   "to",
  320.   "together",
  321.   "too",
  322.   "toward",
  323.   "towards",
  324.   "trillion",
  325.   "twenty",
  326.   "two",
  327.   "u",
  328.   "under",
  329.   "unless",
  330.   "unlike",
  331.   "unlikely",
  332.   "until",
  333.   "up",
  334.   "upon",
  335.   "us",
  336.   "used",
  337.   "using",
  338.   "v",
  339.   "very",
  340.   "via",
  341.   "w",
  342.   "was",
  343.   "wasn't",
  344.   "we",
  345.   "we'd",
  346.   "we'll",
  347.   "we're",
  348.   "we've",
  349.   "well",
  350.   "were",
  351.   "weren't",
  352.   "what",
  353.   "what'll",
  354.   "what's",
  355.   "what've",
  356.   "whatever",
  357.   "when",
  358.   "whence",
  359.   "whenever",
  360.   "where",
  361.   "where's",
  362.   "whereafter",
  363.   "whereas",
  364.   "whereby",
  365.   "wherein",
  366.   "whereupon",
  367.   "wherever",
  368.   "whether",
  369.   "which",
  370.   "while",
  371.   "whither",
  372.   "who",
  373.   "who'd",
  374.   "who'll",
  375.   "who's",
  376.   "whoever",
  377.   "whole",
  378.   "whom",
  379.   "whomever",
  380.   "whose",
  381.   "why",
  382.   "will",
  383.   "with",
  384.   "within",
  385.   "without",
  386.   "won't",
  387.   "would",
  388.   "wouldn't",
  389.   "x",
  390.   "y",
  391.   "yes",
  392.   "yet",
  393.   "you",
  394.   "you'd",
  395.   "you'll",
  396.   "you're",
  397.   "you've",
  398.   "your",
  399.   "yours",
  400.   "yourself",
  401.   "yourselves",
  402.   "z", NULL};
  403.  
  404. void init_stop_list()
  405. {
  406.   stoplist_pointer = 0;
  407. }
  408.  
  409.  
  410. char *next_stop_word()
  411. {
  412.   /* returns NULL if all out */
  413.   if(stoplist[stoplist_pointer] == NULL)
  414.     return(NULL);
  415.   else
  416.     return(stoplist[stoplist_pointer++]);
  417. }
  418.  
  419.   
  420.  
  421.